import React from 'react';

const FunChildren = ({style, count, b, age, decCount}) => {
    console.log("props", decCount)
    return (
        <div>
            <h4 style={style}>函数组件 ==> 子组件</h4>
            <h5>count ==> {count}</h5>
            <h5>b ==> {b}</h5>
            <h5>age ==> {age}</h5>
            <button onClick={() => {
                decCount(2)
            }}>修改count ==> {count}</button>
        </div>
    );
};

FunChildren.propTypes = {
    // 类型必须是数字且不允许省略
    a: Number,
}

export default FunChildren;